home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / lu62 / psconv.c < prev    next >
C/C++ Source or Header  |  1996-07-10  |  4KB  |  134 lines

  1. /*
  2.                           PS_CONV
  3.   Function: take the verb from the transaction program, then
  4.   select the appropriate subroutine and pass to it the control
  5.   in order to process that verb.
  6.  
  7.   Input: The verb code and the pointer to the verb srtucture.
  8.   Output: Return codes which will be placed into the verb structure.
  9.  
  10.   CopyRight 1995. Nicholas Poljakov all rights reserved.
  11.  
  12.  */
  13.  
  14.  #include <state1.h>
  15.  #include <common.h>
  16.  #include <string.h>
  17. int sk_r_wt(void *);
  18. int SendBlock(void *, void *);
  19. int setrc(void *, void *);
  20. int sendhsf(void *);
  21. int sendhs(void *);
  22. int sendbm(void *, void *);
  23. int sendat(void *);
  24. int rtsend(void *);
  25. unsigned long rmfmh5(void *, void *);
  26. int recwait(void *);
  27. int rcvru(void *, void *);
  28. int rcvhs(void *, void *, void *, void *);
  29. int ralloc(void *, void *);
  30. int psrm(int, void *, void *);
  31. int proterr(void *, unsigned long);
  32. int preptrcv(void *);
  33. int post_rcb(void *);
  34. struct repass *postopen(void *);
  35. int phsrec(void *);
  36. int pfmh5(void *);
  37. int opndst(void *);
  38. int obtsess(void *, unsigned char);
  39. int Lrf_handler(void *);
  40. int get_sess(void *, void *);
  41. int get_attr(void *);
  42. int fsm_error(unsigned char, void *);
  43. int fsm_conv(unsigned char, unsigned char, void *);
  44. int flush (void *);
  45. int dcp(void *);
  46. int dealloc(void *);
  47. int crtp(void *);
  48. int conv(void *);
  49. int chkparm(void *, void *);
  50. int check_end(unsigned int, void *);
  51. struct rqb *call_appl(void *);
  52. int buffmng(unsigned char, void *, void *, void *, unsigned, unsigned char, unsigned);
  53. unsigned long attltck(void *);
  54. unsigned long attacheck(void *);
  55. char *cgetmem(int, int);
  56. int sendhsf(void *);
  57. int opndst(void *);
  58. int alloc_rcb(void *, void *);
  59. int allocate(void *);
  60. int clsdst(void *);
  61. int confirm(void *);
  62. int confirmd(void *);
  63.  
  64. ps_conv(code, sptr)
  65. unsigned int code;
  66. char *sptr;
  67.  {
  68.     struct com *p_com;
  69.  
  70. #if OS_TYPE == 1
  71. /*********  Trace facility **********/
  72. unsigned int rtype;   /* type of record */
  73. unsigned int pnum;    /* point number */
  74. char pname[8];        /* name of module */
  75. char *drec;       /* record for dump */
  76. int  lenr;            /* record length */
  77.  
  78. rtype = INPROC;
  79. strcpy(pname, "psconv");
  80. pnum = 1;
  81. drec = &code;
  82. lenr = 2;
  83. gtf(rtype, pname, pnum, drec, lenr);
  84. /***********************************/
  85. #endif
  86.  
  87.     p_com = (struct com *)sptr;
  88.     p_com -> prim_rc = OK;
  89.     p_com -> sec_rc = OK;
  90.  
  91.       switch(code)
  92.             {
  93.               case Allocate :
  94.                               { allocate(sptr);
  95.                                 break; }
  96.               case Confirm  :
  97.                               { confirm(sptr);
  98.                                 break; }
  99.               case COnfirmed :
  100.                               { confirmd(sptr);
  101.                                 break; }
  102.               case Deallocate :
  103.                               { dealloc(sptr);
  104.                                 break; }
  105.               case Get_attributes :
  106.                               { get_attr(sptr);
  107.                                 break; }
  108.               case Flush :
  109.                               { flush(sptr);
  110.                                 break; }
  111.               case Prepare_to_receive :
  112.                               { preptrcv(sptr);
  113.                                 break; }
  114.               case Receive_immediate :
  115.               case Receive_and_wait :
  116.                               { recwait(sptr);
  117.                                 break; }
  118.               case Request_to_send :
  119.                               { rtsend(sptr);
  120.                                 break; }
  121.               case Send_data :
  122.                               { sendat(sptr);
  123.                                 break; }
  124.               case Send_error :
  125.                               { senderr(sptr);
  126.                                 break; }
  127.               case Test :
  128.                               { test(sptr);
  129.                                 break; }
  130.  
  131.           default:        { return(-1);}
  132.             }
  133.  }
  134.